<?php

namespace Events;

use \GatewayWorker\Lib\Gateway;

/**
 * Description of onConnect
 *
 * @author saisai
 */
class onConnect
{

    public static function run($client_id)
    {
        // 向当前client_id发送数据
        Gateway::sendToClient($client_id, \Data\Massage::msg("Hello $client_id", 0, $client_id));
        // 向所有人发送
//        Gateway::sendToAll(\Data\Massage::msg("$client_id Connect ", 0, $client_id));
    }

    //put your code here
}
